<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- react.js react的核心库 提供各种class与api -->
    <script src="../react/react18.development.js"></script>
    <!-- react-dom.js react操作dom的核心库 -->
    <script src="../react/react-dom18.development.js"></script>
</head>

<body>
    <button></button>
    <div class="box"></div>
</body>
<script>

    var span = React.createElement("span", { title: "提示" }, "内容");
    var p = React.createElement("p", null, span);

    var box = document.querySelector(".box");
    // 将创建的react对象 渲染到box这个标签内 box这个标签是一个dom标签

    var root = ReactDOM.createRoot(box);
    console.log(root);
    root.render(p);

</script>

</html>